import {apiSlice} from "@store/apiSlice/index";


export const doctorApiSlice = apiSlice.injectEndpoints({
    endpoints: (builder)=>({
        //获取推荐关注医生列表
        requestDoctors: builder.query<DoctorResponse, PageParams>({
            query: (params) => ({ url: "/home/page/doc", params }),
        }),
        // 评价医生
        EvaluateDoctor: builder.mutation<EvaluateDoctorResponse, EvaluateDoctorParams>({
            query: (body) => ({
                url: "/patient/order/evaluate",
                method: "POST",
                body,
            }),
        }),
    })
})
export const { useLazyRequestDoctorsQuery , useEvaluateDoctorMutation } = doctorApiSlice;